package mc.support.taobao.api;

import com.taobao.api.TaobaoRequest;
import com.taobao.api.request.ClouddataMbpDataFlowbackRequest;
import com.taobao.api.response.ClouddataMbpDataFlowbackResponse;

/**
 * Created with IntelliJ IDEA. <br/>
 * Author: Francis Yun    <br/>
 * Date: 2014-04-10  <br/>
 */
public class FlowbackCloudDataReq extends
        AbstractReq<FlowbackCloudDataReq,
                ClouddataMbpDataFlowbackResponse> {

    private String tableName;

    private String data;

    public FlowbackCloudDataReq tableName(String tableName) {
        this.tableName = tableName;
        return this;
    }

    public FlowbackCloudDataReq data(String data) {
        this.data = data;
        return this;
    }

    @Override
    protected TaobaoRequest toRequest() {
        ClouddataMbpDataFlowbackRequest req = new ClouddataMbpDataFlowbackRequest();

        if ( null != tableName ) {
            req.setTableName( tableName );
        }

        if ( null != data ) {
            req.setData( data );
        }

        return req;
    }

}
